xend: fix "xm list hangs"
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 21 Jun 2010 08:58:17 +0000 (09:58 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 21 Jun 2010 08:58:17 +0000 (09:58 +0100)
commitdf992155c8557babc598fc5e73be6554426233c2
tree549ac09d9106b08863a514b39d282908cfddf815
parent0ca1bba0a609cae055a5cf610889d47ceee6d661
xend: fix "xm list hangs"

If a command hold domains_lock, "xm list" would hang for waiting for
the lock. Such as creating many VMs at a script (such as 20), command
of "xm list" could hang for long time(10 mins).  I think domains_lock
here only protect update().  So, we shouldn't do update before command
of "list" really get this lock, but xm do need show the domain's
information quickly. In this patch, if command couldn't get the
domains_lock after 20 times trying, "xm list" would show the
information of VMs without update().

Signed-off-by: James Song (Wei) <jsong@novell.com>
tools/python/xen/xend/XendDomain.py